package cc.fs.zhihuapp.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import java.util.ArrayList;

import cc.fs.zhihuapp.ui.adapter.MyDateAdapter1;
import cc.fs.zhihuapp.ui.base.BaseListFragment;

/**
 * Created by fostion on 2015/9/6.
 */
public class DataListFragment extends BaseListFragment {

    ArrayList<String> list = new ArrayList<>();
    MyDateAdapter1 adapter;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @Override
    public RecyclerView.LayoutManager getLayoutManager() {
        return new LinearLayoutManager(getActivity());
    }



    @Override
    public RecyclerView.Adapter<RecyclerView.ViewHolder> getListAdapter() {
        adapter = new MyDateAdapter1(list);
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");
        list.add("5");
        list.add("6");
        return adapter;
    }
}
